package com.zzty.training.dao;

import com.zzty.training.entity.Question;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface QuestionDao {
    @Select("select * from question")
    List<Question> getAllQuestion();
    @Insert("insert into question (content) VALUES (#{content})")
    Integer addQuestion(Question question);
    @Select("select * from question where content=#{content}")
    Question getQuestionByContent(Question question);
}
